In a switched Ethernet, it is desired to avoid transmission loops since the network would collapse if frames are sent in loops and self learning addressing deteriorates. Examples of loops in a switched Ethernet are illustrated in FIG. 1.
In addition, loops must also be avoided to achieve redundancy in the network. There are two major techniques for providing redundancy while avoiding transmission loops referred to as link aggregation and solutions based on Spanning Tree Protocol (STP).
Link aggregation (defined in IEEE 802.3 2005) is a method to achieve higher bandwidth and/or redundancy in Ethernet networks. Two or more physical links are combined and treated as one physical link. Hence, a number of the physical links will be treated as one Link Aggregation Group as illustrated in FIG. 2.
There are different Spanning Tree Protocol modes, defined in STP IEEE 802.1d, e.g. Rapid Spanning Tree Protocol IEEE 802.1d and Multiple Spanning Tree Protocol IEEE 802.1q. The principle of the STP is that one of the Ethernet Switches is elected as a root switch in the network, and in the spanning tree every switch has exactly one way to reach the root switch. All other Ethernet switches calculate their path cost to reach the root switch. The cheapest path cost is opened, and all other links are blocked for traffic as illustrated in FIG. 3.
In all STP modes the path cost is used to calculate the cheapest way to reach the root. The path cost is either fixed or based on the bandwidth available on the physical link. When a physical link between two switches is replaced by a LAG (Link Aggregation Group), the bandwidth and cost may vary dependent on the number of operating physical links. The path cost is calculated automatically according to the following formula:Path cost=20 000 000 000 000/Bandwidth
This implies that a bandwidth of 1 Gbit/second gives the path cost 20000.
An additional technique used for STP is to use Layer 2 Gateway Port (L2GP) defined in IEEE 802.1ah 2008. This technique is used to separate different STP domains. One or more ports are elected as Layer two Gateway Ports (L2GPs), which will define the border of a domain in which the STP algorithm is active. Only one L2GP will be open towards another STP domain, i.e. the one with the best root identity, i.e. priority and MAC address. A pseudo root switch is emulated outside the own STP domain.
This is illustrated in FIG. 4 where the L2GP port in the left switch 400 in RSTP domain 1 has lower (better) priority than the L2GP in the right switch 401 which implies that the left switch 400 is open towards the other domain.
When the switch or the physical link where L2GP is configured goes down, any remaining physical loops may open all ports and create loops that results in that frames a caught in the loop. When a root is included in the domain, the solution is to always include the root switch in any loop.
However, when using L2GP, the root switch is not included in the RSTP domain and when the external link to Ethernet Switch 1 goes down, the switches in RSTP domain 1 will experience that the root switch disappears. It takes a certain time period to update the network with a new root switch. During this time period, the problem referred to as “count-to-infinity” may create temporary loops in the RSTP domain 1, as some Ethernet switches has “old” information which not reflects the change of the root switch. Based on this “old” information, the Ethernet switch may decide to open paths such that temporary loops are created.
FIG. 5 illustrates two STP domains 502, 503 where the L2GP of Ethernet Switch 1 500 has gone down and the assigned pseudo root identity no longer is valid as root identity.
The pseudo root must therefore be changed to the pseudo root of Ethernet Switch 2. Since it take some time for the network to be updated with the new pseudo root, the RSTP domain 1 502 may create loops as a result of count-to-infinity problem as long as the network is not fully updated with the new pseudo root.